package com.superquan.selfstudybootmybatis.utils.factory.simple_factory;

/**
 * @program: self-study-bootmybatis
 * @ClassName FileFactory
 * @description: 核心工厂类 负责所有产品的实例化创建
 * @author: zwq
 **/
public class FileFactory {
     public static File createDownFile(String fileType){
         //根据传入的fileType实例化对应的文件创建类
         if(fileType.equals("ali")){
             return new DownAliFile();
         }else if(fileType.equals("weiXin")){
             return new DownWeixinFile();
         }else if(fileType.equals("easyPay")){
             return new DownEasypayFile();
         }else{
             return null;
         }
     }
}
